package com.captjack.netty.httpserver;

import com.captjack.netty.httpserver.config.NettyHttpServerConfig;
import com.captjack.netty.httpserver.handler.NettyHttpServerHandler;
import com.captjack.netty.httpserver.server.NettyHttpServer;

/**
 * @author admin
 */
public class NettyHttpServerApplication {

    public static void main(String[] args) {
        NettyHttpServerConfig httpServerConfig = new NettyHttpServerConfig();
        httpServerConfig.setListenPort(8080);
        NettyHttpServerHandler httpServerHandler = new NettyHttpServerHandler();
        NettyHttpServer nettyHttpServer = new NettyHttpServer(httpServerConfig, httpServerHandler);
        try {
            nettyHttpServer.startListen();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
